<div class="main mt10">
	<!-- Star of area2s -->
	<div class="area2s">
		<!-- Star of col1 -->
		<div class="col1">
			<div class="breadCrumb">
				<div class="fl"><span class="cRed fb">当前位置：</span> <a href="<?php echo CHtml::normalizeUrl(array('/')) ?>">首页</a>&nbsp;›&nbsp;<strong>心理测试</strong></div>
				</div>
            <div class="psyTest-categories mt10"><ul><li><a href="<?php echo CHtml::normalizeUrl(array('/psytest')) ?>"<?php if($category === null) : ?> class="fb"<?php endif ?>>全部测试</a></li><?php foreach($categories as $_category) : ?><li><a href="<?php echo CHtml::normalizeUrl(array('/psytest/list', 'id' => $_category->psyTestCategoryId)) ?>"<?php if($category !== null && $category->psyTestCategoryId == $_category->psyTestCategoryId) : ?> class="fb"<?php endif ?>><?php echo $_category->categoryName ?></a></li><?php endforeach ?></ul></div>
			<div class="psyTest-list mt10">
				<div class="boxB boxNoBg">
					<div class="boxBmiddle">
					<h3><?php if($category !== null) : echo htmlspecialchars($category->categoryName); else: echo '全部心理测试' ?><?php endif ?></h3>
						<ul>
                        <?php if(count($topics) > 0) : ?>
						<?php foreach($topics as $topic) : ?>
							<li>
								<a class="fr" target="_blank" href="<?php echo CHtml::normalizeUrl(array('/psytest/index', 'id' => $topic->topicId)) ?>">
									<img class="test-pic" src="<?php echo $topic->getImageUrl('s') ?>"  alt=""/>								</a>
								<div class="title"><a href="<?php echo CHtml::normalizeUrl(array('/psytest/index', 'id' => $topic->topicId)) ?>" target="_blank"><?php echo htmlspecialchars($topic->topicTitle) ?></a>
								</div>
								<div class="content"><?php echo truncStr(htmlspecialchars(strip_tags($topic->topicDescr)), 260, '...') ?></div>
								<div class="tag"><span>题目数：<?php echo $topic->questionCount ?></span>|<span>参与测试人数：<?php echo $topic->testedCount ?></span>|<span>评论：<?php echo $topic->commentCount ?></span>|<span>添加日期：<?php echo date('Y-m-d', $topic->createdAt) ?></span></div>
							</li>
						<?php endforeach ?>
                        <?php else: ?>
                            <li>该分类下暂无测试。</li>
                        <?php endif ?>
						</ul>
                        <div class="page1">
                            <?php $this->widget('CLinkPager', array('pages' => $pages)); ?>
                        </div>
					</div>
					<div class="boxBbottom">
					   <div class="boxBb1"><div class="boxBb2"><div class="boxBb3"></div></div></div>
					</div>
				</div>
			</div>
		</div>
		<!-- End of col1 -->
		<!-- Star of col2 -->
		<div class="col2">
            <?php $this->widget('Inform') ?>
            <?php $this->widget('RecommendPsytest') ?>
            <?php if($this->beginCache('hot-psytests', array('duration' => 604800))) : ?>
            <?php $this->widget('HotPsytests') ?>
            <?php $this->endCache() ?>
            <?php endif ?>
			<div class="smallAd mt10"><?php echo CHtml::image(Yii::app()->baseUrl.'/images/a-exp1.png', '慧苑心理咨询专注于解决婚姻家庭亲子问题', array('title' => '慧苑心理咨询专注于解决婚姻家庭亲子问题')); ?></div>
		</div>
		<!-- End of col2 -->
	</div>
	<!-- End of area2s -->    
</div>
